package com.meida.module.bus.client.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.meida.common.mybatis.annotation.TableAlias;
import com.meida.common.mybatis.base.entity.AbstractEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.math.BigDecimal;

/**
 * 采购明细表
 *
 * @author flyme
 * @date 2020-10-19
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("bus_purchase_details")
@TableAlias("bpd")
@ApiModel(value = "BusPurchaseDetails对象", description = "采购明细表")
@ToString
public class BusPurchaseDetails extends AbstractEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "purchaseDetailsId", type = IdType.ID_WORKER)
    private Long purchaseDetailsId;

    @ApiModelProperty(value = "采购ID")
    private Long purchaseId;

    @ApiModelProperty(value = "采购详情ID")
    private Long materialId;

    @ApiModelProperty(value = "项目ID")
    private Long projectId;

    @ApiModelProperty(value = "供应商ID")
    private Long vendorId;
    @ApiModelProperty(value = "供应商name")
    private String vendorName;

    @ApiModelProperty(value = "本次采购数量")
    private BigDecimal purchaseNum;

    @ApiModelProperty(value = "在途数量")
    private BigDecimal onLineNum;

    @ApiModelProperty(value = "到货数量")
    private BigDecimal receiveNum;

    @ApiModelProperty(value = "本次计划到货日期")
    private String receivedDate;

    @ApiModelProperty(value = "操作用户")
    private Long userId;

    @ApiModelProperty(value = "状态")
    private Integer state;

    @ApiModelProperty("单据类型")
    private String documentType;

    @ApiModelProperty(value = "是否有开口订单 0否 1是")
    private String  orderflg;

    @ApiModelProperty(value = "材料WBS代码")
    private String materialWbsCode;

    @ApiModelProperty(value = "物料代码")
    private String materialCode;

    @ApiModelProperty("单位名称")
    @TableField(exist = false)
    private String unitName;
    @ApiModelProperty("单位编码")
    @TableField(exist = false)
    private String unitCode;

    @ApiModelProperty(value = "品牌名称")
    private String brandName;

    @ApiModelProperty(value = "技术参数")
    private String technicalData;

    @ApiModelProperty(value = "备注")
    private String remark;

}
